package kaug.p1;

/**
 * A person class to store name and age.
 * @author Ago
 *
 */
public class Person {
	/**
	 * Person's name.
	 */
	String name;
	/**
	 * Persons's age.
	 */
	int age;
	
	/**
	 * Constructor. Called, then instantiated:
	 * <code>
	 * Person p = new Person();
	 * </code>
	 * 
	 * (I use different names for argument variables
	 * to avoid "hiding the field" error)
	 * @param name2 Name of the person
	 * @param age2 Age of the person
	 */
	public Person(String name2, int age2) { // constructor
		this.name = name2;
		this.age = age2;
	}
	
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return name + " " + age;
	}
}
